﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="SelectUserSingle.aspx.vb" Inherits="MyWorkflow.SelectAuditorSingle" %>
<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>
<html>
<head>
<title>查找记录</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8"/>
<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
<link rel="stylesheet" type="text/css" href="/_common/styles/dialogs.css">
<script language="javascript" src="/_controls/settings.aspx"></script>
<script language="javascript" src="/_forms/addrelated.js"></script>
<script language="javascript" src="/_controls/util/util.js"></script>
<script language="javascript" src="/_controls/number/number.js"></script>

<link rel="stylesheet" type="text/css" href="/_common/styles/select.css">
<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
<script language="javascript" src="/_controls/util/util.js"></script>
<script language="javascript" src="/_common/scripts/global.js"></script>

<link rel="stylesheet" type="text/css" href="/_controls/lookup/lookupdialogs.css">
<script language="javascript" src="/_controls/lookup/map_lookupdialogs.js"></script>

<link rel="stylesheet" type="text/css" href="/_grid/map_grid.css">
<link rel="stylesheet" type="text/css" href="/_controls/find/find.css">
<link rel="stylesheet" type="text/css" href="/_controls/tree/gridtree.css">
		
	<script language="JavaScript">
	    var _ShowDisabledUser = <%="'" & ShowDisabledUser & "'"%> ;
	
		function cancel()
		{
			window.close();
		}
	
		function window.onload()
		{ 
			return;
			appendExistingItems();
			findValue.focus();
			parent.closeWaiting();
		}
		
		function resultsReady()
		{
			if ( frmResults.document.readyState == "complete" )
			{
				document.body.style.cursor = "auto";
				
				btnGo.disabled = false;
			}
		}
		
		
		
		//	双击选中行
		function appendSelected()
		{
			selectItem();
		}

		//单击组织架构树
		function myQuery()
		{
			findValue.value="";
			search();
		}
		
		//单击查找按钮
		function search()
		{
			var oTr = appGridTree.selectedRow;
			if(oTr==undefined || oTr=="undefined") return;

			var url = "UserList.aspx";
			url += "?Type=" + oTr.type;
			url += "&ShowDisabledUser=" + _ShowDisabledUser;
			url += "&GUID=" + oTr.GUID;
			url += "&SearchValue=" + URLEncode(findValue.value);
			frmResults.location.href = url;
		}
		
		function selectItem()
		{
			if (frmResults.tblResults != undefined)
			{
				if( frmResults.tblResults.selectedItems )
				{
					window.returnValue = buildReturnValue( frmResults.tblResults.selectedItems );
					window.close();
				}
			}
			else
			{
				window.close();
			}
		}
		
	
	</script>
</head>

<body style="margin:10px">
		<table cellspacing="0" cellpadding="0" width="100%" height="100%">
			<tr height="30px">
				<td class="search">
					<table width="100%" cellpadding="2" cellspacing="0">
						<col><col width="100%"><col>
						<tr>
							<td noWrap width="60px"><b style="color:#666666;">查找:</b></td>
							<td><input maxlength="95%" onkeydown="findValueKeyDown()" tabindex="2" type="text" id="findValue" style="width:100%;font-size:9pt;border:1px solid #7b9ebd;"></td>
							<td width="100px"><button disabled="true" tabindex="3" id="btnGo" onclick="search();" title="查找记录">查找</button></td>
						</tr>
						<tr><td colspan=3 style="height:10px;font-size:1px;border-bottom:2px inset #ffffff;">&nbsp;</td></tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table height="100%" width="100%" id="tblFind" cellpadding="0" cellspacing="0" style="table-layout:fixed">
						<tr height="20px">
							<td>组织架构:</td>
							<td width="5px"></td>
							<td width="260px">所有成员:</td>
						</tr>
						<tr>
							<td rowspan=2 valign="top">
								<cnt:AppGridTree id="appGridTree" runat="server" filter="<filter />" />
							</td>
							<td colspan=2 height="2px"></td>
						</tr>
						<tr height="100%">
							<td width="5px"></td>
							<td>
								<iframe scrolling="no" tabindex="4" class="results" onreadystatechange="resultsReady()" id="frmResults" src="UserList.aspx"></iframe>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr><td style="height:10px;font-size:1px;border-bottom:2px inset #ffffff;">&nbsp;</td></tr>
			<tr height="40">
					<td class="buttons">
						<button style="WIDTH:70px" onclick="selectItem()" id="btnOk" type="button">确 定</button>&nbsp;&nbsp;
						<button style="WIDTH:70px" onclick="parent.window.close();" type="button">取 消</button>
					</td>
				</tr>
		</table>

</body>
</html>
